projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
899619f
)
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Warn on empty let bodies
author
Stefan Monnier
<monnier@iro.umontreal.ca>
Mon, 15 Feb 2021 17:07:52 +0000
(12:07 -0500)
committer
Stefan Monnier
<monnier@iro.umontreal.ca>
Mon, 15 Feb 2021 17:07:52 +0000
(12:07 -0500)
lisp/emacs-lisp/macroexp.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/macroexp.el
b/lisp/emacs-lisp/macroexp.el
index 13ff5ef2edab4949642f7c647b40840d010e39e8..0934e43e66a8c59b11683721cb2f3d40ed6939b3 100644
(file)
--- a/
lisp/emacs-lisp/macroexp.el
+++ b/
lisp/emacs-lisp/macroexp.el
@@
-299,7
+299,12
@@
Assumes the caller has bound `macroexpand-all-environment'."
(`(,(and fun (or 'let 'let*)) . ,(or `(,bindings . ,body) dontcare))
(macroexp--cons fun
(macroexp--cons (macroexp--all-clauses bindings 1)
- (macroexp--all-forms body)
+ (if (null body)
+ (macroexp-unprogn
+ (macroexp--warn-and-return
+ (format "Empty %s body" fun)
+ nil t))
+ (macroexp--all-forms body))
(cdr form))
form))
(`(,(and fun `(lambda . ,_)) . ,args)